// $Id: champ_ro_rw.js 267 2008-08-11 09:39:29Z pcoustillas $ 

function champ_modif_rw(id_frm)
{

	for (i=0 ; i < document.getElementById(id_frm).length ; i++)
	{
		
		type_champ=document.getElementById(id_frm)[i].type

		if (type_champ == "text") 
		{
			document.getElementById(id_frm)[i].className="champ_modif_rw";
			document.getElementById(id_frm)[i].readOnly=false;
		}
		if (type_champ == "select-one") 
		{
			document.getElementById(id_frm)[i].className="champ_modif_rw";
			document.getElementById(id_frm)[i].disabled=false;
		}
	}

	//inverser les boutons modifs et validation
	//alert(id_frm + "validation");
	document.getElementById(id_frm + "_validation").style.visibility="visible";
	document.getElementById(id_frm + "_modif").style.visibility="hidden";

}

function champ_modif_ro(id_frm)
{
	for (i=0 ; i < document.getElementById(id_frm).length ; i++)
	{
		
		type_champ=document.getElementById(id_frm)[i].type

		if (type_champ == "text") 
		{
			document.getElementById(id_frm)[i].className="champ_modif_ro";
			document.getElementById(id_frm)[i].readOnly=false;
		}
		if (type_champ == "select-one") 
		{
			document.getElementById(id_frm)[i].className="champ_modif_ro";
			document.getElementById(id_frm)[i].disabled=false;
		}
	}

	document.getElementById(id_frm + "_validation").style.visibility="hidden";
  document.getElementById(id_frm + "_modif").style.visibility="visible";
}